#pragma once


#include "Device.h"
#include "Mesh.h"
#include "Effect.h"
#include "Texture.h"
#include "Camera.h"

#include <d3dx10math.h>
#include <list>

namespace Crows3D
{
   class Model
   {
   private:
      std::list<Mesh*>                          meshes;
      std::list<EffectPositionTextureNormal*>   effects;
      std::list<Texture*>                       textures;

      int numSubsets;
      

      D3DXVECTOR3 position;
      D3DXVECTOR3 rotation;
      D3DXVECTOR3 scale;

      bool destoryMembers;

   public:
      Model(void);
      ~Model(void);

      bool LoadTexturedCube(Device *dev);

      bool AddSubset(Device *dev, Mesh *mesh, EffectPositionTextureNormal* effect, Texture *texture);

      void Render(Device* dev, Camera* cam);

      void SetPosition(float x,  float y,  float z);
      void SetRotation(float rx, float ry, float rz);
      void SetScaling(float sx, float sy, float sz);
   };
}